//
//  UIView+Frame.m
//  01-UIView、UIWindow
//
//  Created by dllo on 16/7/14.
//  Copyright © 2016年 QC.L. All rights reserved.
//

#import "UIView+Frame.h"

@implementation UIView (Frame)
- (void)setYh_x:(CGFloat)yh_x {
    CGRect rect = self.frame;
    rect.origin.x = yh_x;
    self.frame = rect;
}

- (CGFloat)yh_x {
    return self.frame.origin.x;
}

- (void)setYh_y:(CGFloat)yh_y {
    CGRect rect = self.frame;
    rect.origin.y = yh_y;
    self.frame = rect;

}

- (CGFloat)yh_y {
    return self.frame.origin.y;
}

- (void)setYh_width:(CGFloat)yh_width {
    CGRect rect = self.frame;
    rect.size.width = yh_width;
    self.frame = rect;
}

- (CGFloat)yh_width {
    return self.frame.size.width;
}

- (void)setYh_height:(CGFloat)yh_height {
    CGRect rect = self.frame;
    rect.size.height = yh_height;
    self.frame = rect;
}

- (CGFloat)yh_height {
    return self.frame.size.height;
}
@end
